//找元素
let title = document.querySelector('.title')
let cartList = document.querySelector('.cart-list')
//鼠标移入操作
title.onmouseenter = enter
//鼠标移出操作
title.onmouseleave = leave
//鼠标移入操作
cartList.onmouseenter = enter
//鼠标移出操作
cartList.onmouseleave = leave

function enter() {
    cartList.style.display = 'block'
    cartList.style.zIndex = "0";
    title.style.borderBottom = "none"
    title.style.backgroundColor = "#fff"
}

function leave() {
    cartList.style.display = 'none'
    title.style.borderBottom = "1px solid #ddd"
    title.style.backgroundColor = "#F5F5F5"
}